home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 501-525 / disk_519 / avlsort / avlsort.doc < prev    next >
Text File  |  1992-05-06  |  3KB  |  110 lines

  1. NAME
  2.     AVLSort - Sort a file.
  3.  
  4.  
  5. SYNOPSIS
  6.     AVLSORT From To COLSTART/k WIDTH/k CASE/s REVERSE/s STRIP/s OPT/k
  7.  
  8.  
  9. DESCRIPTION
  10.     AVLSort was written to remedy several defects of the ARP Sort
  11.     command.  AVLSort places each line of text in an AVL tree, which has
  12.     reasonable worst-case performance, even for large files.  I have not
  13.     made speed comparisons with AmigaDos Sort or with ARP Sort.
  14.  
  15.     This program can handle large files, up to available memory. There
  16.     is no arbitrary limit on the number of lines in the file (I have
  17.     seen a report that ARP Sort is limited to 32767 lines).
  18.  
  19.     The order of otherwise identical lines does not change in the output
  20.     file.  This can happen in ARP Sort when using the COLSTART and WIDTH
  21.     switches.
  22.  
  23.     If you omit the From argument from Sort, it reads from its standard
  24.     input, which allows it to be used in pipelines.
  25.  
  26.  
  27. OPTIONS
  28.     From infile
  29.         Input file name.  Default is stdin.
  30.  
  31.     To outfile
  32.         Output file name.  Default is stdout.
  33.  
  34.     COLSTART n
  35.         This takes a numeric argument which gives the starting
  36.         column for the sort.  All entries to the left of this column
  37.         will not be considered in the final arrangement.  Default is
  38.         column 1.
  39.  
  40.     WIDTH n
  41.         This takes a numeric argument, which gives the width for the
  42.         sort.  Default is to use the entire line.
  43.  
  44.         You can use this to specify a 'window' for Sort to work on. 
  45.         For example, using a WIDTH of 4 will arrange a file based on
  46.         the first 4 characters of each line.  If you also use
  47.         COLSTART, then the first 4 characters starting at that
  48.         column will be the ones on which the sort is based.
  49.  
  50.     CASE
  51.         The CASE switch will use a case-sensitive match, rather than
  52.         the default case-insensitive match.
  53.  
  54.     REVERSE
  55.         The REVERSE switch will cause the sorted file to be printed
  56.         in reverse order.
  57.  
  58.         **  This switch is not available with the AmigaDos or ARP
  59.             Sort commands.
  60.  
  61.     STRIP
  62.         Strip trailing white space from input lines.
  63.  
  64.         **  This switch is not available with the AmigaDos or ARP
  65.             Sort commands.
  66.  
  67.     TABSTOP n
  68.         Tabs in the input file will be expanded to blanks, with
  69.         tab stops every <n> columns.
  70.  
  71.         **  This switch is not available with the AmigaDos or ARP
  72.             Sort commands.
  73.  
  74.     OPT T|C|R|S
  75.         Same as TABSTOP 8 | CASE | REVERSE | STRIP.
  76.  
  77.         **  This switch is not available with the AmigaDos or ARP
  78.             Sort commands.
  79.  
  80.  
  81. EXAMPLE
  82.     list >listfile
  83.     avlsort listfile colstart 41
  84.     or using pipes: list | avlsort colstart 41
  85.  
  86.     This gives a listing of all files sorted by time (i.e., from the
  87.     earliest to the latest).
  88.  
  89.  
  90. BUGS
  91.     File size is limited by available memory.
  92.  
  93.  
  94. SEE ALSO
  95.     ARP Sort
  96.  
  97. AUTHOR
  98.     Robert L. Pyron
  99.  
  100.  
  101. CREDITS
  102.     The AVL tree package was written by Mark E. Mallett of Zinn Computer
  103.     Company, copyright 1988.
  104.  
  105.     The startup code is by Sebastiano Vigna, based on previous work by
  106.     Scott Ballantine and John Toebes.
  107.  
  108.     Much of this document (AVLSORT.DOC) was lifted from the ARP
  109.     documentation for Sort.
  110.